# 集合: 可变 set()、不可变 fronzenset()
# 作用：去重

data_01 = "aaaaaabbbbbabbabababababccccccccccccccc"
new_data_01 = set(data_01)
print(new_data_01)

print("------------" * 8)

data_02 = ("nginx", "php", "tomcat", "redis", "php", "tomcat", "redis","php", "tomcat", "redis")
new_data_02 = frozenset(data_02)
print(new_data_02)

for i in new_data_02:
    print(i)

print("------------" * 8)

data_03 = "aaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbccccccccccccaaaaaaaaa"

for i in set(data_03):
    print("字符: %s, 出现的次数: %s" % (i, data_03.count(i)))
